package vip.zhenzicheng.algorithm.huawei_od;

import java.util.Scanner;

/**
 * 求一个正整数的所有指数因子，从小到大以空格分隔输出（重复的也要）
 * 例如：180 -> 2 2 3 3 5
 * (2 * 2 * 3 * 3 * 5) = 180
 *
 * @author zhenzicheng
 * @date 2023-02-25 12:49
 */
public class Hj6 {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int num = in.nextInt();
    while (num / 2 != 0) {
      for (int start = 2; start <= num; start++) {
        if (num % start == 0) {
          System.out.printf(start + " ");
          num /= start;
          break;
        }
        // 质数的
        else if (start > 2) {
          start++;
        }
      }
    }
  }
}
